A Typed Intermediate Language for Flow-Directed Compilation
نویسندگان
چکیده
We present a typed intermediate language λ for optimizing compilers for function-oriented and polymorphically typed programming languages (e.g., ML). The language λ is a typed lambda calculus with product, sum, intersection, and union types as well as function types annotated with flow labels. A novel formulation of intersection and union types supports encoding flow information in the typed program representation. This flow information can direct optimization.
منابع مشابه
Compiling with Types
Compilers for monomorphic languages, such as C and Pascal, take advantage of types to determine data representations, alignment, calling conventions, and register selection. However, these languages lack important features including polymorphism, abstract datatypes, and garbage collection. In contrast, modern programming languages such as Standard ML (SML), provide all of these features, but ex...
متن کاملA Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages (Technical Report)
Introducing aspect orientation to a polymorphically typed functional language strengthens the importance of type-scoped advices; i.e., advices with their effects being harnessed by type constraints. As types are typically treated as compile time entities, it is desirable to be able to perform static weaving to determine at compile time the chaining of type-scoped advices to the invocations of t...
متن کاملA Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages
Introducing aspect orientation to a polymorphically typed functional language strengthens the importance of type-scoped advices; i.e., advices with their effects harnessed by type constraints. As types are typically treated as compile time entities, it is highly desirable to be able to perform static weaving to determine at compile time the chaining of type-scoped advices to their associated jo...
متن کاملType-Directed Flow Analysis for Typed Intermediate Languages
Flow analysis is especially valuable for optimizing functional languages because control-ow information is not syntactically apparent in higher-order programs. Flow analyses typically operate on untyped languages. However, recent compilers for typed functional languages such as ML and Haskell use a typed intermediate language to expose data representations for optimization. This paper presents ...
متن کاملNAC: A lightweight intermediate representation for ASIP compilers
ASIP processors are tuned for optimized mapping of narrow application sets in heterogeneous platforms. Their successful development relies on compiler-based design space exploration. The careful design of the compiler intermediate language is a necessity, due to its dual purpose as both the program representation and an abstract target machine. Its design affects the complexity, efficiency and ...
متن کامل